package com.company.poker.network;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Description of class.
 * Created 4/10/13 3:11 PM
 *
 * @author andrey.rodin@playtech.com
 */

public class NetworkManagerRunner {
    private static final Logger LOGGER = LoggerFactory.getLogger(NetworkManagerRunner.class);

    public static void main(String[] args) {

        NetworkManager networkManager = new NetworkManager(args[0], Integer.valueOf(args[1]),Integer.valueOf(args[2]),Integer.valueOf(args[3]));
        ((NetworkPipelineFactory)networkManager.getPipelineFactory()).setHandler(new DefaultMessageHandler());
        LOGGER.debug("NetworkManager initialization... ");
        networkManager.init();
        LOGGER.debug("NetworkManager starting... ");
        networkManager.start();
    }
}
